package com.colorful.insuranceproject.bean;

import android.os.Parcel;
import android.os.Parcelable;


/**
 * Created by handsome-Bob on 2017/11/15.
 *
 *   推送成功后的数据值
 */
public class MessageContentBean implements Parcelable{

    /**
     *  isEnough
     */
    private boolean isEnough;

    /**
     *  KEKANGANPAY
     */
    private String keKangAnPay;

    /**
     *  OTHERPAY
     */
    private String otherPay;

    private int type;


    public MessageContentBean() {
    }

    public MessageContentBean(boolean isEnough, String keKangAnPay, String otherPay, int type) {
        this.isEnough = isEnough;
        this.keKangAnPay = keKangAnPay;
        this.otherPay = otherPay;
        this.type = type;
    }

    public boolean isEnough() {
        return isEnough;
    }

    public void setEnough(boolean enough) {
        isEnough = enough;
    }

    public String getKeKangAnPay() {
        return keKangAnPay;
    }

    public void setKeKangAnPay(String keKangAnPay) {
        this.keKangAnPay = keKangAnPay;
    }

    public String getOtherPay() {
        return otherPay;
    }

    public void setOtherPay(String otherPay) {
        this.otherPay = otherPay;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "MessageContentBean{" +
                "isEnough=" + isEnough +
                ", keKangAnPay='" + keKangAnPay + '\'' +
                ", otherPay='" + otherPay + '\'' +
                ", type=" + type +
                '}';
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeByte(this.isEnough ? (byte) 1 : (byte) 0);
        dest.writeString(this.keKangAnPay);
        dest.writeString(this.otherPay);
        dest.writeInt(this.type);
    }

    protected MessageContentBean(Parcel in) {
        this.isEnough = in.readByte() != 0;
        this.keKangAnPay = in.readString();
        this.otherPay = in.readString();
        this.type = in.readInt();
    }

    public static final Creator<MessageContentBean> CREATOR = new Creator<MessageContentBean>() {
        @Override
        public MessageContentBean createFromParcel(Parcel source) {
            return new MessageContentBean(source);
        }

        @Override
        public MessageContentBean[] newArray(int size) {
            return new MessageContentBean[size];
        }
    };
}
